import time

from appium.webdriver.common.mobileby import MobileBy

from AppWorkWxin.PO.basepage import BasePage


class AddMember(BasePage):
    
    def addmember_by_manual(self, membername, phoneno):
        """
        手动输入添加
        输入成员信息加入企业通讯录
        :return:
        """
        self.find(MobileBy.ID, "com.tencent.wework:id/b09").send_keys(membername)
        self.find(MobileBy.ID, "com.tencent.wework:id/f7y").send_keys(phoneno)
        self.find(MobileBy.ID, "com.tencent.wework:id/ad2").click()
        # self.desired_capabilities["appActivity"] = ".launch.WwMainActivity"
        self.driver.back()
        self.driver.back()
        
    
    def addmember_by_wxmates(self):
        """
        微信同事邀请
        :return:
        """
        pass
    
    def addmember_by_contactlist(self):
        """
        从微信/手机通讯录添加
        :return:
        """
        pass
    
    def addmember_by_photos(self):
        """
        拍照添加
        拍通讯录，自动识别成员信息添加
        :return:
        """
        pass